package com.idanchuang.count.service;

import com.idanchuang.user.count.service.api.request.command.count.UserMultiScenesCountResetCommand;
import com.idanchuang.user.count.service.api.request.command.count.UserMultiScenesCountUpdateCommand;
import com.idanchuang.user.count.service.api.request.command.count.UserSceneCountUpdateCommand;
import com.idanchuang.user.count.service.api.request.query.count.UserCountBatchQuery;
import com.idanchuang.user.count.service.api.request.query.count.UserCountQuery;
import com.idanchuang.user.count.service.api.response.UserMultiScenesCountDTO;
import com.idanchuang.user.count.service.api.response.UserSceneCountDTO;

import java.util.List;

/**
 * 应用层 - 用户计数实际处理逻辑
 *
 * @author Richard_yyf
 * @version 1.0 2021/5/27
 */
public interface UserCountService {

    /**
     * 异步消息驱动 - 单一用户场景计数
     *
     * @param userSceneCountUpdateCommands 批量 计数请求
     */
    void count(List<UserSceneCountUpdateCommand> userSceneCountUpdateCommands);

    /**
     * 批量计数
     *
     * @param userMultiScenesCountUpdateCommands 多场景计数请求
     */
    void multiCount(List<UserMultiScenesCountUpdateCommand> userMultiScenesCountUpdateCommands);

    /**
     * 批量对用户计数做重置
     * @param resetCommands 重置命令
     */
    void batchResetCount(List<UserMultiScenesCountResetCommand> resetCommands);

    /**
     * 单一用户 单一场景计数 查询
     *
     * @param userCountQuery 单一场景计数 查询请求
     * @return result
     */
    UserSceneCountDTO query(UserCountQuery userCountQuery);

    /**
     * 单一用户 多个场景计数 批量查询
     *
     * @param userCountBatchQuery 多场景计数 批量查询请求
     * @return result
     */
    UserMultiScenesCountDTO batchQuery(UserCountBatchQuery userCountBatchQuery);
}
